package com.designed.pattern.creational.factorymethod;

import com.designed.pattern.creational.factorymethod.core.*;

/**
 * @author yifei
 * @date 2024/3/28
 **/
public class FactoryAdvanced implements IFactory{
    @Override
    public Operation createOperation(String operType) {
        Operation oper = null;
        switch (operType){
            case "log":
                oper = new Add();
                break;
            case "pow":
                oper = new Sub();
                break;
        }
        return oper;
    }
}
